﻿using System.Data;
using MyFloridaHouse.libSvDTO;

namespace MyFloridaHouse.DataAccess.Extensions
{
	/// <summary>
	/// [Obsolete] DataDictionaryDTODataContract
	/// </summary>
    public static class DataDictionaryDTODataContract
    {
		//Todo: Remove unused code.
		/// <summary>
		/// [Obsolete] DataContract.
		/// </summary>
		/// <param name="rdr">The RDR.</param>
		/// <returns></returns>
        public static DataDictionaryDTO DataContract(IDataReader rdr)
        {
            var newItem = new DataDictionaryDTO
                          	{
                          		dictionaryID = (int) rdr["dictionaryID"],
                          		fieldName = rdr["fieldName"].ToString(),
                          		dataSource = rdr["dataSource"].ToString(),
                          		dataType = rdr["dataType"].ToString(),
                          		detailDesc = rdr["detailDesc"].ToString(),
                          		isDisplay = (bool) rdr["isDisplay"]
                          	};
			return (newItem);
        }
    }
}
